/**
*  \file cosdo_abort_codes.h
*
*  \brief   CAN Open SDO abort codes
*
*  \author  Michael J. Hohmann <michael.hohmann@linde-mh.de>
*  \author  Michael Kunkelmann <michael.kunkelmann@linde-mh.de>
*
*/

#ifndef COSDO_ABORT_CODES_H_INCLUDED
#define COSDO_ABORT_CODES_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/

/** Toggle bit not alternated. */
#define COSDO_ABORT_TOGGLE_BIT_NOT_ALTERNATED                                       U32_CONST(0x05030000)

/** SDO protocol timed out. */
#define COSDO_ABORT_SDO_PROTOCOL_TIMED_OUT                                          U32_CONST(0x05040000)

/** Client/server command specifier not valid or unknown. */
#define COSDO_ABORT_CLIENT_OR_SERVER_COMMAND_SPECIFIER_NOT_VALID_OR_UNKNOWN         U32_CONST(0x05040001)

/** Invalid block size (block mode only). */
#define COSDO_ABORT_INVALID_BLOCK_SIZE                                              U32_CONST(0x05040002)

/** Invalid sequence number (block mode only). */
#define COSDO_ABORT_INVALID_SECUENCE_NUMBER                                         U32_CONST(0x05040003)

/** CRC error (block mode only). */
#define COSDO_ABORT_CRC_ERROR                                                       U32_CONST(0x05040004)

/** Out of memory. */
#define COSDO_ABORT_OUT_OF_MEMORY                                                   U32_CONST(0x05040005)

/** Unsupported access to an object. */
#define COSDO_ABORT_UNSUPPORTED_ACCESS_TO_AN_OBJECT                                 U32_CONST(0x06010000)

/** Attempt to read a write only object. */
#define COSDO_ABORT_ATTEMPT_TO_READ_A_WRITE_FILE_ONLY                               U32_CONST(0x06010001)

/** Attempt to write a read only object. */
#define COSDO_ABORT_ATTEMPT_TO_WRITE_A_READ_FILE_ONLY                               U32_CONST(0x06010002)

/** Object does not exist in the object dictionary. */
#define COSDO_ABORT_OBJECT_DOES_NOT_EXIST                                           U32_CONST(0x06020000)

/** Object cannot be mapped to the PDO. */
#define COSDO_ABORT_OBJECT_CANNOT_BE_MAPPED_TO_PDO                                  U32_CONST(0x06040041)

/** The number and length of the objects to be mapped would exceed PDO length. */
#define COSDO_ABORT_OBJECT_LENGTH_NOT_VALID                                         U32_CONST(0x06040042)

/** General parameter incompatibility reason. */
#define COSDO_ABORT_GENERAL_PARAMETER_INCOMPATIBILITY_REASON                        U32_CONST(0x06040043)

/** General internal incompatibility in the device. */
#define COSDO_ABORT_GENERAL_INTERNAL_INCOMPATIBILITY                                U32_CONST(0x06040047)

/** Access failed due to an hardware error. */
#define COSDO_ABORT_ACCESS_FAILED_DUE_TO_AN_HARDWARE_ERROR                          U32_CONST(0x06060000)

/** Data type does not match) length of service parameter does not match */
#define COSDO_ABORT_SERVICE_LENGTH_PARAMETER_DOES_NOT_MATCH                         U32_CONST(0x06070010)

/** Data type does not match, length of service parameter too high */
#define COSDO_ABORT_DATA_TYPE_DOES_NOT_MATCH_LENGTH_OF_SERVICE_PARAMETER_TOO_HIGH   U32_CONST(0x06070012)

/** Data type does not match, length of service parameter too low */
#define COSDO_ABORT_DATA_TYPE_DOES_NOT_MATCH_LENGTH_OF_SERVICE_PARAMETER_TOO_LOW    U32_CONST(0x06070013)

/** Sub-index does not exist. */
#define COSDO_ABORT_SUB_INDEX_DOES_NOT_EXIST                                        U32_CONST(0x06090011)

/** Value range of parameter exceeded (only for write access). */
#define COSDO_ABORT_VALUE_RANGE_OF_PARAMETER_EXCEEDED                               U32_CONST(0x06090030)

/** Value of parameter written too high. */
#define COSDO_ABORT_VALUE_OF_PARAMETER_WRITTEN_TOO_HIGH                             U32_CONST(0x06090031)

/** Value of parameter written too low. */
#define COSDO_ABORT_VALUE_OF_PARAMETER_WRITTEN_TOO_LOW                              U32_CONST(0x06090032)

/** Maximum value is less than minimum value. */
#define COSDO_ABORT_MAX_VALUE_IS_LESS_THAN_MIN_VALUE                                U32_CONST(0x06090036)

/** General error */
#define COSDO_ABORT_GENERAL_ERROR                                                   U32_CONST(0x08000000)

/** Data cannot be transferred or stored to the application. */
#define COSDO_ABORT_DATA_CANNOT_BE_TRANSFERED_OR_STORED                             U32_CONST(0x08000020)

/** Data cannot be transferred or stored to the application because of local control. */
#define COSDO_ABORT_DATA_CANNOT_BE_TRANSFERED_OR_STORED_LOCAL_CONTROL               U32_CONST(0x08000021)

/** Data cannot be transferred or stored to the application because of the present device state. */
#define COSDO_ABORT_DATA_CANNOT_BE_TRANSFERED_OR_STORED_PRESENT_DEVICE              U32_CONST(0x08000022)

/** Object dictionary dynamic generation fails or no object dictionary is present
* (e.g. object dictionary is generated from file and generation failsbecause of an file error).
*/
#define COSDO_ABORT_OBJECT_GENERATION_FAILS_OR_OBJECT_NOT_PRESENT                   U32_CONST(0x08000023)



/*================================================[ public datatypes ]================================================*/

/*================================================[ public variables ]================================================*/

/*================================================[ public functions ]================================================*/

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2011 - 2013 Linde Material Handling. All rights reserved.                      *
***********************************************************************************************************************/
